import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Home from '../pages/index.vue'

const routes = [{
		path: '/',
		name: 'Home',
		component: Home,
		meta: {
			title: '翼鸟系统管理平台',
		},
		children: [
			/*首页*/
			{
				path: "index/index",
				component: () => import('../pages/shouye/homePage.vue'),
			},
			/*资源管理*/
			{
				path: "resources/allResources",
				component: () => import('../pages/resources/allResources.vue'),
				meta: {
					title: '资源管理'
				}
			},
			{
				path: "resources/classResources",
				component: () => import('../pages/resources/classResources.vue'),
				meta: {
					title: '资源分类'
				}
			},
			{
				path: "resources/orderManage",
				component: () => import('../pages/resources/orderManage.vue'),
				meta: {
					title: '资源订单'
				}
			},
			{
				path: "resources/downLoadeManage",
				component: () => import('../pages/resources/downLoadeManage.vue'),
				meta: {
					title: '资源下载记录'
				}
			},
			/*提现管理*/
			{
				path: "tixian/tiXian",
				component: () => import('../pages/tiXian.vue'),
				meta: {
					title: '提现记录'
				}
			},
			/*系统设置*/
			{
				path: "system/basics",
				component: () => import('../pages/system/basics.vue'),
				meta: {
					title: '基础配置'
				}
			},
			{
				path: "system/label",
				component: () => import('../pages/system/label.vue'),
				meta: {
					title: '标签设置'
				}
			},
			{
				path: "system/indexNav",
				component: () => import('../pages/system/indexNav.vue'),
				meta: {
					title: '首页Nav'
				}
			},
			{
				path: "system/pay",
				component: () => import('../pages/system/pay.vue'),
				meta: {
					title: '支付设置'
				}
			},
			{
				path: "system/sms",
				component: () => import('../pages/system/sms.vue'),
				meta: {
					title: '短信接口'
				}
			},
			{
				path: "system/vip",
				component: () => import('../pages/system/vip.vue'),
				meta: {
					title: '会员设置'
				}
			},
			{
				path: "system/config",
				component: () => import('../pages/system/config.vue'),
				meta: {
					title: '系统设置'
				}
			},
			{
				path: "system/advertisementSpaceList",
				component: () => import('../pages/system/ad/getAdvertisementSpaceList.vue'),
				meta: {
					title: '广告位管理'
				}
			},
			{
				path: "system/addAmendList",
				component: () => import('../pages/system/ad/addAmendList.vue'),
				meta: {
					title: '添加广告位'
				}
			},
			{
				path: "system/advertisList",
				component: () => import('../pages/system/ad/advertisList.vue'),
				meta: {
					title: '广告管理'
				}
			},			
			/*会员管理*/
			{
				path: "user/member",
				component: () => import('../pages/huiyuan/member.vue'),
				meta: {
					title: '用户管理'
				}
			},
			{
				path: "user/createRequest",
				component: () => import('../pages/huiyuan/createRequest.vue'),
				meta: {
					title: '创作者申请'
				}
			},
			{
				path: "user/vipOrder",
				component: () => import('../pages/huiyuan/vipOrder.vue'),
				meta: {
					title: 'VIP订单'
				}
			},
			{
				path: "user/feedback",
				component: () => import('../pages/huiyuan/feedback.vue'),
				meta: {
					title: '用户反馈'
				}
			},
			/*文章管理*/
			{
				path: "article/articleClassify",
				component: () => import('../pages/article/articleClassify.vue'),
				meta: {
					title: '文章分类'
				}
			},
			{
				path: "article/articleContent",
				component: () => import('../pages/article/articleContent.vue'),
				meta: {
					title: '文章管理'
				}
			},
			//文章管理，文章类容子组件
			{
				path: "article/contentChild",
				component: () => import('../pages/article/Childs/contentChild.vue'),
			},
			/*统计*/
			{
				path: "statistatis/user-log",
				component: () => import('../pages/huiyuan/user-log.vue'),
				meta: {
					title: '用户登录日志'
				}
			},
			{
				path: "statistatis/smsCode",
				component: () => import('../pages/statistatis/smsCode.vue'),
				meta: {
					title: '短信验证码记录'
				}
			},
			{
				path: "statistatis/errorMog",
				component: () => import('../pages/statistatis/errorMog.vue'),
				meta: {
					title: '错误日志'
				}
			},
			{
				path: "kecheng/list",
				component: () => import('../pages/kecheng/list.vue'),
				meta: {
					title: '课程列表'
				}
			},
			{
				path: "kecheng/order",
				component: () => import('../pages/kecheng/order.vue'),
				meta: {
					title: '课程订单'
				}
			},
			{
				path: "tongbu/ziyuan",
				component: () => import('../pages/resources/tongbu.vue'),
				meta: {
					title: '资源同步'
				}
			},
			{
				path: "tongbu/config",
				component: () => import('../pages/system/tongbuConfig.vue'),
				meta: {
					title: '同步配置'
				}
			},
			{
				path: "update/update",
				component: () => import('../pages/system/update.vue'),
				meta: {
					title: '系统更新'
				}
			},
		]
	},
	/*登录*/
	{
		path: "/login",
		component: () => import('../pages/login.vue'),
		meta: {
			title: '登录'
		}
	},
	{
		path: "/ziyuan/preview", // 资源预览
		component: () => import('../pages/resources/preview.vue'),
		meta: {
			title: '资源预览'
		}
	},
]

const router = createRouter({
	mode: "hash",
	history: createWebHistory(process.env.BASE_URL),
	routes
})

export default router